﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ViewDisbursementList.aspx.cs" Inherits="logicunivesityinventorystore.Store.ViewDisbursementList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
      <script language="javascript" type="text/javascript">
          function getbacktostepone() {
              window.location = "EditExpanse.aspx";
          }
          function onSuccess() { 
              setTimeout(okay, 2000);
          }
          function onError() {
              setTimeout(getbacktostepone, 2000);
          }
          function okay() {
             // window.parent.document.getElementById('btnOkay').
              window.parent.document.getElementById('btnOkay').click();
              
          }
          function cancel() {
             
                  window.parent.document.getElementById('btnCancel').click();
          }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" value="" runat="server" id="hdnWindowUIMODE" />
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="popup_Container">
        <div class="popup_Titlebar" id="PopupHeader">
            <div class="TitlebarLeft">
                Edit Expanse
            </div>
            <div class="TitlebarRight" onclick="cancel();">
            </div>
        </div>
        <div class="popup_Body">
            <asp:MultiView ID="MultiViewExpanse" runat="server" ActiveViewIndex="0">
                <asp:View ID="ViewInput" runat="server">
                    &nbsp;<asp:Label ID="Label1" runat="server" Text="Select Department" ToolTip=" "></asp:Label>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                        DataSourceID="ObjectDataSource2" DataTextField="DepartmentName" 
                        DataValueField="DepartmentCode" 
                        onselectedindexchanged="DropDownList1_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                        SelectMethod="FindAll" TypeName="BusinessLogicLayer.DepartmentFacade">
                    </asp:ObjectDataSource>
                    <br />
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        DataSourceID="ObjectDataSource3" onrowcommand="GridView1_RowCommand" 
                       >
                        <Columns>
                            <asp:TemplateField HeaderText="Disbursement Number">
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" 
                                        CommandArgument='<%# Eval("DisbursementNo") %>' 
                                        Text='<%# Eval("DisbursementNo") %>' CommandName="Select"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="DateModified" HeaderText="Date Fullied" />
                        </Columns>
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ObjectDataSource3" runat="server" 
                        SelectMethod="FindRetrivalListByDept" 
                        TypeName="BusinessLogicLayer.RetrivalListFacade">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList1" Name="departmentCode" 
                                PropertyName="SelectedValue" Type="String" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server">
                    </asp:ObjectDataSource>
                </asp:View>
                
            </asp:MultiView>
        </div>
        <div class="popup_Buttons">
        <input id="btnOkay" value="Ok" type="button" onclick="okay();" />
          <%--  <asp:Button ID="btnOkay" Text="Done" runat="server"  />--%>
            <input id="btnCancel" value="Cancel" type="button" onclick="cancel();" />
        </div>
    </div>
    </form>
</body>
</html>
